#include <stdio.h>

int main() {
	int n = 0;
	int arr[10000] = { 0 };
	int i = 0;
	scanf("%d", &n);
	int max = 0;
	int index[10000] = { 0 };
	int j = 0;
	int count = 0;
	for (i = 0; i < n; i++) {
		scanf("%d", &arr[i]);
	}
	max = arr[0];
	for (i = 1; i < n; i++) {
		if (arr[i] > max) {
			max = arr[i];

		}
	}
	j = 0;
	for (i = 0; i < n; i++) {
		if (arr[i] == max) {
			index[j] = i;
			j++;
			count++;
		}
	}
	for (j = 0; j < count; j++) {
		printf("%d ", index[j]);
	}



	return 0;
}
